home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / lib / galaxy.g < prev    next >
Encoding:
Text File  |  1996-04-04  |  14.7 KB  |  523 lines  |  [TEXT/XCNQ]

  1. (game-module "galaxy"
  2.   (title "Galaxy")
  3.   (blurb "the 24th century")
  4.   (variants (see-all) (world-seen) (world-size))
  5. )
  6.  
  7. ; UNITS
  8.  
  9. (unit-type |photon torpedo| (image-name "gxy-pt")
  10.   (help "shoot these at your enemy"))
  11. (unit-type storm-trooper (image-name "soldiers")
  12.   (help "for capturing planets, moons, & death stars"))
  13. (unit-type |SF-1 fighter| (image-name "gxy-f1")
  14.   (help  "moves fast, can hit most things"))
  15. (unit-type transport (image-name "gxy-st")
  16.   (help "for transporting the troopers"))
  17. (unit-type |light cruiser| (image-name "gxy-lc")
  18.   (help "quick lightly armoured cruiser"))
  19. (unit-type battlecruiser (image-name "gxy-cc")
  20.   (help "specially designed for fleet action"))
  21. (unit-type dreadnought (image-name "gxy-dd")
  22.   (help "heavily armoured with deadly phasers"))
  23. (unit-type |death star| (image-name "death-star")
  24.   (help "make your enemies afraid, very afraid..."))
  25. (unit-type moon (image-name "moon")
  26.   )
  27. (unit-type planet (image-name "planet")
  28.   (help "makes stuff (esp. cruisers, dreadnoughts & deathstars)"))
  29.  
  30. (define p |photon torpedo|)
  31. (define s storm-trooper)
  32. (define f |SF-1 fighter|)
  33. (define t transport)
  34. (define l |light cruiser|)
  35. (define b battlecruiser)
  36. (define d dreadnought)
  37. (define @ |death star|)
  38. (define x moon)
  39. (define X planet)
  40.  
  41. ; MATERIALS
  42.  
  43. (material-type photons
  44.   (notes "fuels photon torpedos"))
  45. (material-type matter
  46.   (notes "part of the fuel for ships' movement"))
  47. (material-type anti-matter
  48.   (notes "part of the fuel for ships' movement & phasers"))
  49. (material-type o2
  50.   (notes "for the troopers to breathe"))
  51.  
  52. (define ph photons)
  53. (define m matter)
  54. (define a anti-matter)
  55. (define o o2)
  56.  
  57. ; TERRAIN
  58.  
  59. (terrain-type vacuum (color "navy blue") (char "."))
  60. (terrain-type nebula (color "grey") (char "%"))
  61. (terrain-type blackhole (color "black") (char "!"))
  62.  
  63. (set alt-blob-density 10000)
  64. (set alt-blob-height 500)
  65. (set alt-blob-size 200)
  66. (set alt-smoothing 4)
  67. (set wet-blob-density 2000)
  68. (set wet-blob-size 100)
  69.  
  70. (add t* alt-percentile-min ( 0   0  98))
  71. (add t* alt-percentile-max (98  98 100))
  72. (add t* wet-percentile-min ( 0  90   0))
  73. (add t* wet-percentile-max (90 100 100))
  74.  
  75. ; should have low blob density
  76.  
  77. ;; DEFINES
  78.  
  79. (define places (@ x X))
  80. (define planets (x X))
  81. (define movers (p s f t l b d @))
  82. (define starships (t l b d))
  83. (define hosts (t l b d @ x X))
  84. (define guests (p s f))
  85.  
  86. (table vanishes-on
  87.   (u* blackhole true)
  88.   (s t* true) ; no troops allowed out in space
  89. )
  90.  
  91. ;; STARTUP
  92.  
  93. (add places point-value 5000)
  94. (add (s f t l b d @ p) point-value (256 256 255 24 10 200 230 256))
  95.  
  96. (add vacuum country-terrain-min 6)
  97.  
  98. (table favored-terrain
  99.   (places blackhole 0)
  100.   (places vacuum (70 50 85))
  101.   (places nebula (30 50 15))
  102. )
  103. (add (X x t l b d @ s f) start-with (2 3 2 2 2 1 1 4 5))
  104.  
  105. (table independent-density ((X x) vacuum (20 40)))
  106.  
  107. (set country-radius-min 3)
  108. (set country-separation-min 20)
  109. (set country-separation-max 100)
  110.  
  111. (add (X x) already-seen 100)
  112.  
  113. (add (X x) see-always true)
  114.  
  115. ;; Units always start out full of everything.
  116.  
  117. (table unit-initial-supply (u* m* 20000))
  118.  
  119. ;; THINGS OUT OF CONTROL
  120.  
  121. ;10000 blackhole u* accident
  122. ;"has been sucked into a BLACK HOLE!!" u* accident-message
  123.  
  124. ;; THINGS IN CONTROL
  125.  
  126. ;; Production and Repair
  127.  
  128. (add movers cp (3  2  3  8  9 15 30 150))
  129.  
  130. (table acp-to-create
  131.   ((x X) movers 1)
  132.   ((l b d @) p 1)
  133.   (@ f 1)
  134.   )
  135.  
  136. (table cp-on-creation
  137.   ((x X) movers 1)
  138.   (X movers (2 1 1 1 3 4 11 121))
  139.   ((l b d @) p (1 2 3 3))
  140.   (@ f 1)
  141.   )
  142.  
  143. (table acp-to-build
  144.   ((x X) movers 1)
  145.   ((l b d @) p 1)
  146.   (@ f 1)
  147.   )
  148.  
  149. (table cp-per-build
  150.   (u* u* 1)
  151.   )
  152.  
  153. (table material-to-create
  154.   (p ph 5)
  155.   )
  156.  
  157. ;1 movers [ @ x X ] repair
  158. ;1 f starships repair
  159. ;2 d d repair
  160. ;3 starships starships repair
  161.  
  162. ;; Materials
  163.  
  164. (table base-production
  165.   (starships (ph m a) 3)
  166.   (d ph 5)
  167.   (@ m* 30)
  168.   (x m* 40)
  169.   (X m* 50)
  170.   )
  171.  
  172. ;;; the following doesn't make any sense to sts - nebulas
  173. ;;; should be better for material production, not worse
  174. ;100 t* u* productivity
  175. ;50 nebula u* productivity 
  176. ;100 nebula [ x X @ ] productivity
  177.  
  178. (table unit-storage-x
  179.   ;;       p  s  f  t    l   b   d    @    x     X
  180.   (u* ph (01 00 00 00   15  20  30   30   60    90)) 
  181.   (u*  m (00 00 34 1500 300 550 1000 5000 10000 20000))
  182.   (u* o2 (00 01 00 1500 300 550 1000 5000 10000 20000))
  183.   (u*  a (00 00 05 1500 300 550 1000 5000 10000 20000))
  184.   )
  185.  
  186. (table base-consumption
  187.   ((f t l b d) m 1)
  188.   ((f t l b d) a 1)
  189.   (p ph 1)
  190.   (s o2 1) ; storm-troopers must die in space
  191.   )
  192.  
  193. (table consumption-per-move
  194.   (f m 1)
  195.   ((t l b d @) (m a) 1)
  196.   (s o2 1)
  197.   )
  198.  
  199. (table hp-per-starve
  200.   (p ph 1.00)
  201.   (s o2 1.00)
  202.   )
  203.  
  204. ;"has suffocated" s starve-message 
  205. ;"has run out of fuel and disintegrated" f starve-message
  206. ;"missed" p starve-message
  207. ;
  208. ;1 a f hits-with
  209. ;2 a [ t l b d @ x X ] hits-with
  210. ;1 a u* hit-by
  211. ;
  212. ;0 r* u* out-length
  213. ;0 r* u* in-length
  214. ;-1 r* [ f s ] out-length 
  215. ;-1 r* [ x X ] in-length
  216. ;0 s t in-length ; 
  217.  
  218. ; CAPACITY
  219.  
  220. (table unit-capacity-x
  221.   ((l b d) f (1 2 3))
  222.   (t s 5)
  223.   (@ u* 10)
  224.   (@ places 0)
  225.   (@ d 1)
  226.   ((b d) p (2 5))
  227.   (x u* 10)
  228.   (X u* 20)
  229.   (planets planets 0)
  230.   )
  231.  
  232. ;1 u* volume
  233. ;100 u* hold-volume
  234.  
  235. ; MOVEMENT
  236.  
  237. ;                       p s  f t  l  b  d @ x X
  238. (add u* acp-per-turn   (7 1 17 7 12 10 12 4 1 1))
  239.  
  240. (add (x X) speed 0)
  241.  
  242. (table mp-to-enter-terrain
  243.   (u* nebula 2)
  244. )
  245.  
  246. ;17 u* f enter-time
  247. ;100 u* p enter-time
  248.  
  249. (table material-to-move
  250.   (f m 1)
  251.   ((t l b d @) (m a) 1)
  252.   )
  253.  
  254. ;; SIGHT
  255.  
  256. ;80 nebula u* conceal ; nebulas hide stuff
  257.  
  258. ;                     p s f t l b d @ x X
  259. (add u* vision-range (1 1 2 2 3 3 4 7 2 4))
  260.  
  261. ;1 p see-best   ;1
  262. ;0 p see-worst
  263. ;100 [ X x d @ b l ] see-best 
  264. ;60 [ X x d @ b l f t ]  see-worst
  265.  
  266. ;COMBAT
  267.  
  268. ;                        p s f t l b  d  @  x  X
  269. (add u* hp-max          (1 1 2 2 5 9 14 31 25 40))
  270. ;(add u* hp-at-max-speed (0 0 0 1 2 4  5  0  5  5))
  271.  
  272. (table hit-chance
  273. ;;         p  s   f   t   l   b   d   @   x   X
  274.   (p u* ( 00 100 100 100 095 090 085 099 100 100))
  275.   (s u* ( 00 050 010 030 030 030 020 010 050 050))
  276.   (f u* ( 00 050 050 070 040 035 030 002 000 000))
  277.   (t u* ( 00 020 020 050 020 020 020 020 000 000))
  278.   (l u* ( 00 070 070 070 050 035 030 030 000 000))
  279.   (b u* ( 00 090 060 085 065 050 040 040 000 000))
  280.   (d u* ( 00 100 070 095 075 060 050 050 000 000))
  281.   (@ u* ( 00 060 085 090 080 080 080 050 085 060))
  282.   (x u* ( 00 010 010 030 020 010 005 005 000 000))
  283.   (X u* ( 00 020 020 040 030 020 010 010 000 000))
  284.   )
  285.  
  286. (table damage
  287.   (u* u* 1)
  288.   (d u* 2)
  289.   (@ u* 50) ;if you see a death star, you should be terrified
  290.   (@ @ 5)   ; (but not so much if you have one yourself!)
  291.   (f d 2)
  292.   (@ (x X) 999)
  293.   (p u* 2)
  294.   (f @ 999)
  295.   )
  296.  
  297. ;true p self-destruct
  298. ;false p can-counter
  299.  
  300. ;50 guests hosts protect
  301. ;80 u* places protect
  302. ;0 places places protect 
  303. ;30 @ [ x X ] protect 
  304. ;80 p u* protect
  305.  
  306. (table capture-chance
  307.   (s places (020 050 030))
  308.   )
  309.  
  310. (add movers acp-to-disband 1)
  311. (add movers hp-per-disband 99)
  312.  
  313. ;GENERAL STUFF
  314.  
  315. (add u* acp-to-change-side 1)
  316. (add s acp-to-change-side 0)
  317.  
  318. (add s possible-sides (not "independent"))
  319.  
  320. ;"destroyed" u* destroy-message
  321. ;"annihilated" s destroy-message
  322. ;"DESTROYED" places destroy-message
  323. ;"has been attacked by" p destroy-message 
  324. ;"zorched" l destroy-message
  325. ;"ZORCHED" [ b d ] destroy-message
  326.  
  327. (scorekeeper (do last-side-wins))
  328.  
  329. (set action-messages '(
  330.   ((attack p) (sound "explosion-long"))
  331.   ((attack f) (sound "laser"))
  332.   ((attack |SF-1 fighter|) (sound "laser"))
  333.   ((attack l) (sound "laser"))
  334.   ((overrun l) (sound "laser"))
  335.   ((overrun |light cruiser|) (sound "laser"))
  336.   ))
  337.  
  338. ;; NAMES 
  339.  
  340. ;;; Sort of a mishmash, but who cares...
  341.  
  342. (set side-library '(
  343.   (10 (name "Federation") (adjective "Federation"))
  344.   (10 (name "Klingon Empire") (adjective "Klingon"))
  345.   ((adjective "Vulcan"))
  346.   ((adjective "Jedi"))
  347.   ((name "Romulus") (adjective "Romulan"))
  348.   ((adjective "Rebel"))
  349.   ((adjective "Corazan"))
  350.   ((name "Earth") (adjective "Terran"))
  351.   ((adjective "Cylon"))
  352.   ((adjective "Orion"))
  353.   ((adjective "Ferengi"))
  354.   ((adjective "Zen"))
  355.   ((adjective "Time Lord"))
  356.   ((adjective "Kharg"))
  357.   ((adjective "Cyborg"))
  358.   ((adjective "Dalek"))
  359.   ((adjective "Kelvin"))
  360.   ((adjective "Goth"))
  361.   ((adjective "Vogon"))
  362. ))
  363.  
  364. (add (x X) namer "random-planets")
  365.  
  366. (namer random-planets (random
  367. "Argon" "Tertulian" "Atlantis" "Isis" "Cuthka"
  368. "Prene" "Ziul" "Aja" "Hukan" "Burran" 
  369. "Zenon" "Vorscica" "Khakan" "Trantor" "Solcan"
  370. "Cjiny" "Caligula" "Ipaar" "Ryurr" "Mentha"
  371. "Vrudn" "Martel" "Loki" "Mendelan"
  372. "Saure" "Juvak" "Kaos" "Irrenbuk" "Calazan"
  373. "Ether" "Astral" "Keeguran" "Dospas" "Centari"
  374. "Alpha" "Guerilli" "Galeo" "Charon" "Appolo"
  375. "Ulam Batar" "Urishina" "Zaariana" "Shadowfax"
  376. "Cloudy Coffee"  "with nice beaches" "of the Apes"
  377. "Kyuin" "Reydak" "Baal" "Geryon" "Dispater"
  378. "Azurn" "Mythos" "Nantes" "Kourion" "Turton"
  379. "Moori" "Pelanda" "Sirith" "Celan" "Corolla"
  380. "Muur" "Sol Invictus" "Saladan" "Samnth" "Awe"
  381. "Kvack" "Portuli" "Turin" "Anthran" "Xerxes"
  382. "Zeus" "Keno" "Terre" "Vito" "Vishnu" 
  383. "Visigoth" "Romulus" "Kresge" "Kor" "Kolkhoz"
  384. "Algol" "Quixote" "Quirinal" "Chisholm" 
  385. "Archangel" "Ariananus" "Buran" "Kea" "Tara"
  386. "Gustavus" "Antioch" "Piraeus" "Vaudois" "Vault"
  387. "Rastaan" "Daggoroth" "Beina" "Breton" 
  388. "Gallivent" "Galaak" "Galifre" "Lise" "Abidjan"
  389. "Acanthus" "Achilles" "Actaeon" "Adelia" "Adonis"
  390. "Axla" "Alnu" "Alcestis" "Alkmena" "Alexei"
  391. "Garcia" "New Peoria" "Penelope" "Taurus"
  392. "Bevois" "Odin" "Dwyer" "Aegean" "Vega"
  393. "Altar" "Betelgeuse" "Aldebaran" "Procyon"
  394. "Spica" "Lapella" "Deneb" "Venus" "Mars" 
  395. "Io" "Ganymede" "Europa" "Rigel" "Rigel VII"
  396. "Rigel XII" "DeLorian" "Pyrrus" "New Warth"
  397. "Dorsai" "Xax" "Cygnus X-1" ; its really a black hole but..
  398. "Terminus"  "Felicity" "Sanction" "goes BOOM"
  399. ))
  400.  
  401. (game-module (notes (
  402.   "This period has a number of strange features:"
  403.   " Stormtroopers are terriblly loyal. On your command,"
  404.   "  they will move into outer-space and suffocate."
  405.   " Photon torpedos are generally the most effective means"
  406.   "  of destroying enemy ships; but hold your fire until "
  407.   "  you have enough for the kill."
  408.   " SF-1 fighters have a "Skywalker" chance of destroying Death"
  409.   "  Stars.  Naturally, its a suicide run.  "
  410.   " Blackholes will eat any ships you put into them.  So"
  411.   "  watch for them."
  412.   ""
  413.   "The machine players haven't figured any of this out. "
  414.   " Thus, their play is less than wonderful."
  415.   ""
  416.   ""
  417. ;; this should probably be part of the module header,
  418. ;; so can be displayed in appropriate contexts.
  419.   " by Victor Mascari"
  420.   "Copyright 1991, Henry Ware & Victor Mascari"
  421.   "Please distribute this, rewrite it etc. However,"
  422.   "you may not sell it, and this message must remain"
  423.   "intact.  Of course, if you do any of these things, we"
  424.   "will never know."
  425.   "Converted to version 7 by Stan Shebs."
  426.   ""
  427.   " Thanks to the writter of the 'Starwars'"
  428.   "  period for icons and ideas, and to "
  429.   "  Henry Ware for some icons and technical"
  430.   "  advice."
  431.  
  432.   "This period was written by Victor Mascari at The Ohio State University."
  433.   ""
  434.   "Strategy depends upon size of the map you're playing on. The smaller the"
  435.   "map, the smaller unit that should be built. Large maps require big fleets."
  436.   ""
  437.   "Fleets tend to be the preferred method of warfare. In addition, the person"
  438.   "that attacks first usually wins, so gather as much intelligence about"
  439.   "the movements of the enemy as possible, and keep main battle fleet away "
  440.   "from his until you can strike with full force."
  441.   ""
  442.   "Nebula hide ships 80% of the time, but also slow them down."
  443.   ""
  444.   "5 photon torpedos are needed to destroy a moon, 8 for a planet."
  445.   ""
  446.   "Blackholes are hard to spot, so pay attention to where your moving or else"
  447.   "you'll loose your ship."
  448.   ""
  449.   "The computer is fairly stupid in this period and is fairly easy to defeat. The"
  450.   "skills learned to defeat the computer will, in general, not apply to human"
  451.   "opponents."
  452. )))
  453.  
  454. (add @ notes (
  455.   "The Deathstar is the more powerful unit in this period.  In close quarters"
  456.   "other units can be flattened, however deathstar can be captured by"
  457.   "storm troopers and have some vunerability to fighters. They are the"
  458.   "only moving unit which repairs itself once a turn."
  459. ))
  460. (add p notes (
  461.   "The Photon Torpedo is the main means of attack.  It has a range of seven and"
  462.   "does two points to ships and five to planets.  Its often wise to save these"
  463.   "until you have enough to kill a big ship in one turn: wounded ships often "
  464.   "make it home."
  465. ))
  466. (add s notes (
  467.   "Storm Trooper suffocate in outerspace, so don't put them there.  "
  468. ))
  469. (add f notes (
  470.   "Fighters are good for reconnaissance and for harrasing the enemy battle "
  471.   "cruisers.  Send them take a point point of damage and come home. As"
  472.   "previously mentioned they have a slim chance of destroying a death star"
  473.   "in one hit, however, its a suicide run."
  474. ))
  475. (add t notes (
  476.   "Transports are, naturally, vulnerable and sorta slow."
  477. ))
  478. (add l notes (
  479.   "Light Cruisers are the smallest of the fleet ships.  They are very vulnerable"
  480.   "in fleet combat however, especially to dreadnoughts.  They are good at "
  481.   "reconnaissance.  They can be used as batteries to provide photon"
  482.   "torpedos, but they don't make many.  The main use of light cruisers"
  483.   "is to provide bait to attract his ships or, occasionally, to eat up his"
  484.   "photon torpedos."
  485. ))
  486. (add b notes (
  487.   "Battle Cruisers provide photon torpedos.  Generally, they provide the"
  488.   "backbone of a battle fleet."
  489. ))
  490. (add d notes (
  491.   "Dreadnoughts are the largest of the fleet ships and are tough in close "
  492.   "combat.  But, despite the name, it best to play these ships with a "
  493.   "certain amount of caution; one dreadnought can not take on a fleet, "
  494.   "and deathstars demand a respectful amount of distance."
  495. ))
  496.  
  497. (add x notes (
  498.   "Planets and Moons are the main producers.  Generally, the more powerful"
  499.   "the unit to be constructed, the better it is to produce it in a planet."
  500.   "As for the defense of these units, there are several schools of thought."
  501.   "One school says the best defense is a good offense.  Another holds"
  502.   "that fighter patrols are cheap and effective against enemy landings."
  503.   "Or that a loaded transport should be kept to retake any enemy conquests,"
  504.   "and as defense against a deathstar.  Some people like to supply their"
  505.   "planets with a large number of torpedos.  Finally, some people like to"
  506.   "let the enemy bombard their planets, thus 'wasting' torpedos and "
  507.   "allowing the defender to destroy the attacking fleet.   "
  508. ))
  509.  
  510. (add X notes (
  511.   "Planets and Moons are the main producers.  Generally, the more powerful"
  512.   "the unit to be constructed, the better it is to produce it in a planet."
  513.   "As for the defense of these units, there are several schools of thought."
  514.   "One school says the best defense is a good offense.  Another holds"
  515.   "that fighter patrols are cheap and effective against enemy landings."
  516.   "Or that a loaded transport should be kept to retake any enemy conquests,"
  517.   "and as defense against a deathstar.  Some people like to supply their"
  518.   "planets with a large number of torpedos.  Finally, some people like to"
  519.   "let the enemy bombard their planets, thus 'wasting' torpedos and "
  520.   "allowing the defender to destroy the attacking fleet.   "
  521. ))
  522.  
  523.